package com.baizhi.thread;

/**
 * 用Lambda表达式创建线程
 */
public class ThreadDemo5 {

    public static void main(String[] args) {

       Runnable r1 = ()->{
            for (int i = 0; i < 10000; i++) {
                System.out.println("大家好");
            }
        };


       Runnable r2 = ()->{
           for (int i = 0; i < 1000; i++) {
               System.out.println("才是真的好！");
           }
       };

       new Thread(r1).start();
       new Thread(r2).start();
    }
}
